
// var failed1 = Promise.reject('bbbb error');
// var failed2 = new Promise((resolve, reject) => {
// 	reject(failed1)
// })
// var failed3  = Promise.reject(Promise.reject(Promise.reject(Promise.reject(failed2))))


// failed1.then(value=> {
// 	console.log('failed1 value ' + value)
// }, reason=>{
// 	console.log('-----------------------\n')
// 	console.log('failed1 reason ' + reason)
// })



// failed2.then(value=> {
// 	console.log('failed2 value ' + value)
// }, reason=>{
// 	console.log('-----------------------\n')
// 	console.log('failed2 reason ' + reason)
// })



// failed3.then(value=> {
// 	console.log('failed3 value ' + value)
// }, reason=>{
// 	console.log('-----------------------\n')
// 	console.log('failed3 reason ' + reason)
// })



/*
Promise.reject(Promise.reject('bbbb failed')).then(value=> {
	console.log('-----------------------\n')
	console.log('reject1 value ' + value)
}, reason=>{
	console.log('reject1 reason ' + reason)
}).then(value=> {
	console.log('-----------------------\n')
	console.log('reject 2 value ' + value)
}, reason=>{
	console.log('reject 2 reason ' + reason)
})

*/

console.log(Promise.resolve(Promise.resolve('aaa ok')))
console.log(Promise.reject(Promise.reject('bbbb failed')))
